package com.itheima.mm.mapper;

import com.itheima.mm.pojo.Dict;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description DictMapper
 * @Author xiao
 * @Date 2024-06-26
 *
 *
 */
@Mapper
public interface DictMapper {

    //根据id查询省份数据字典列表
    @Select("select * from t_dict where data_type = #{typeId}")
    List<Dict> selectListByType(Integer typeId);



    //根据指定（省份）数据字典ID查询（城市）级联数据列表
    @Select("select * from t_dict where pid = #{pid} order by order_no desc")
    List<Dict> selectSubListByPid(Integer pid);
}
